<?php
namespace app\admin\library;

use app\admin\model\HouseProperty as PropertyModel;

class Property
{
    public static function getProperty($user = null)
    {
        $result = 0;
        if ($user) {
            $properties = PropertyModel::where('admin_user_id', $user)->order('sort')->find();
            if ($properties) {
                $result = $properties['id'];
            }
        }
        return $result;
    }
}
